﻿<?xml version="1.0" encoding="utf-8"?>
<Dashboard CurrencyCulture="en-US">
  <Title Visible="false" Text="Dashboard" />
  <DataSources>
    <SqlDataSource ComponentName="DashboardSqlDataSource_DangMuon">
      <Name>SQL Data Source_DangMuon</Name>
      <Connection Name="ConnectionStringOnline" FromAppConfig="true" />
      <Query Type="StoredProcQuery" Name="load_themuon">
        <ProcName>load_themuon</ProcName>
      </Query>
      <ResultSchema>
        <DataSet Name="SQL Data Source_DangMuon">
          <View Name="load_themuon">
            <Field Name="id_mathe" Type="Int32" />
            <Field Name="id_sach" Type="String" />
            <Field Name="tensach" Type="String" />
            <Field Name="kieumuon" Type="Boolean" />
            <Field Name="ngaymuon" Type="DateTime" />
            <Field Name="ngaytra" Type="DateTime" />
            <Field Name="taikhoan" Type="String" />
            <Field Name="tennv" Type="String" />
          </View>
        </DataSet>
      </ResultSchema>
      <CalculatedFields>
        <CalculatedField Name="KieuMuon" Expression="Iif([kieumuon] = True, 'Mượn Về Nhà', 'Mượn Tại Chỗ')" DataMember="load_themuon" />
      </CalculatedFields>
    </SqlDataSource>
    <SqlDataSource ComponentName="DashboardSqlDataSource_LichSuMuon">
      <Name>SQL Data Source_LichSuMuon</Name>
      <Connection Name="ConnectionStringOnline" FromAppConfig="true" />
      <Query Type="StoredProcQuery" Name="load_thongkemuon">
        <ProcName>load_thongkemuon</ProcName>
      </Query>
      <ResultSchema>
        <DataSet Name="SQL Data Source_LichSuMuon">
          <View Name="load_thongkemuon">
            <Field Name="id_mathe" Type="Int32" />
            <Field Name="id_sach" Type="String" />
            <Field Name="tensach" Type="String" />
            <Field Name="kieumuon" Type="Boolean" />
            <Field Name="ngaymuon" Type="DateTime" />
            <Field Name="ngaytra" Type="DateTime" />
            <Field Name="taikhoan" Type="String" />
            <Field Name="tennv" Type="String" />
          </View>
        </DataSet>
      </ResultSchema>
      <CalculatedFields>
        <CalculatedField Name="KieuMuon" Expression="Iif([kieumuon] = True, 'Mượn Về Nhà', 'Mượn Tại Chỗ')" DataMember="load_thongkemuon" />
      </CalculatedFields>
    </SqlDataSource>
  </DataSources>
  <Items>
    <Pie ComponentName="PieDashboardItem1" Name="Pies 1" ShowCaption="false" Group="DashboardItemGroup1" DataSource="DashboardSqlDataSource_DangMuon" DataMember="load_themuon">
      <InteractivityOptions MasterFilterMode="Multiple" />
      <DataItems>
        <Dimension DataMember="ngaymuon" DateTimeGroupInterval="DayMonthYear" UniqueName="DataItem0" />
        <Measure DataMember="id_mathe" Name="Số Sách - Ngày Mượn" SummaryType="Count" UniqueName="DataItem1" />
      </DataItems>
      <Arguments>
        <Argument UniqueName="DataItem0" />
      </Arguments>
      <Values>
        <Value UniqueName="DataItem1" />
      </Values>
    </Pie>
    <Pie ComponentName="PieDashboardItem2" Name="Pies 2" ShowCaption="false" Group="DashboardItemGroup1" DataSource="DashboardSqlDataSource_DangMuon" DataMember="load_themuon">
      <DataItems>
        <Measure DataMember="id_sach" Name="Số Sách - Ngày Hẹn Trả" SummaryType="Count" UniqueName="DataItem0" />
        <Dimension DataMember="ngaytra" DateTimeGroupInterval="DayMonthYear" UniqueName="DataItem1" />
      </DataItems>
      <Arguments>
        <Argument UniqueName="DataItem1" />
      </Arguments>
      <Values>
        <Value UniqueName="DataItem0" />
      </Values>
    </Pie>
    <Chart ComponentName="ChartDashboardItem1" Name="Độc Giả - Sách" Group="DashboardItemGroup1" DataSource="DashboardSqlDataSource_DangMuon" DataMember="load_themuon">
      <DataItems>
        <Dimension DataMember="taikhoan" UniqueName="DataItem0" />
        <Dimension DataMember="tensach" UniqueName="DataItem1" />
        <Measure DataMember="id_sach" Name="Số Lượng (%)" SummaryType="Count" UniqueName="DataItem2" />
      </DataItems>
      <SeriesDimensions>
        <SeriesDimension UniqueName="DataItem1" />
      </SeriesDimensions>
      <Arguments>
        <Argument UniqueName="DataItem0" />
      </Arguments>
      <Panes>
        <Pane Name="Pane 1">
          <Series>
            <Simple SeriesType="FullStackedBar">
              <Value UniqueName="DataItem2" />
            </Simple>
          </Series>
        </Pane>
      </Panes>
    </Chart>
    <Chart ComponentName="ChartDashboardItem2" Name="Kiểu Mượn - Sách" Group="DashboardItemGroup1" DataSource="DashboardSqlDataSource_DangMuon" DataMember="load_themuon">
      <DataItems>
        <Measure DataMember="id_sach" Name="Số Lượng (%)" SummaryType="Count" UniqueName="DataItem0" />
        <Dimension DataMember="KieuMuon" UniqueName="DataItem1" />
        <Dimension DataMember="tensach" UniqueName="DataItem2" />
      </DataItems>
      <SeriesDimensions>
        <SeriesDimension UniqueName="DataItem2" />
      </SeriesDimensions>
      <Arguments>
        <Argument UniqueName="DataItem1" />
      </Arguments>
      <Panes>
        <Pane Name="Pane 1">
          <Series>
            <Simple SeriesType="FullStackedBar">
              <Value UniqueName="DataItem0" />
            </Simple>
          </Series>
        </Pane>
      </Panes>
    </Chart>
    <Pie ComponentName="PieDashboardItem3" Name="Sách - Tháng" Group="DashboardItemGroup2" DataSource="DashboardSqlDataSource_LichSuMuon" DataMember="load_thongkemuon">
      <InteractivityOptions MasterFilterMode="Multiple" />
      <DataItems>
        <Measure DataMember="id_sach" SummaryType="Count" UniqueName="DataItem1" />
        <Dimension DataMember="tensach" UniqueName="DataItem2" />
        <Dimension DataMember="ngaymuon" DateTimeGroupInterval="MonthYear" UniqueName="DataItem0" />
      </DataItems>
      <SeriesDimensions>
        <SeriesDimension UniqueName="DataItem0" />
      </SeriesDimensions>
      <Arguments>
        <Argument UniqueName="DataItem2" />
      </Arguments>
      <Values>
        <Value UniqueName="DataItem1" />
      </Values>
    </Pie>
    <Chart ComponentName="ChartDashboardItem3" Name="Độc Giả - Sách" Group="DashboardItemGroup2" DataSource="DashboardSqlDataSource_LichSuMuon" DataMember="load_thongkemuon">
      <DataItems>
        <Dimension DataMember="taikhoan" UniqueName="DataItem1" />
        <Dimension DataMember="tensach" UniqueName="DataItem2" />
        <Measure DataMember="id_sach" Name="Số Lượng (%)" SummaryType="Count" UniqueName="DataItem0" />
      </DataItems>
      <SeriesDimensions>
        <SeriesDimension UniqueName="DataItem2" />
      </SeriesDimensions>
      <Arguments>
        <Argument UniqueName="DataItem1" />
      </Arguments>
      <Panes>
        <Pane Name="Pane 1">
          <Series>
            <Simple SeriesType="FullStackedBar">
              <Value UniqueName="DataItem0" />
            </Simple>
          </Series>
        </Pane>
      </Panes>
    </Chart>
    <Chart ComponentName="ChartDashboardItem4" Name="Kiểu Mượn - Sách" Group="DashboardItemGroup2" DataSource="DashboardSqlDataSource_LichSuMuon" DataMember="load_thongkemuon">
      <DataItems>
        <Measure DataMember="id_sach" Name="Số Lượng (%)" SummaryType="Count" UniqueName="DataItem0" />
        <Dimension DataMember="KieuMuon" SortOrder="Descending" UniqueName="DataItem1" />
        <Dimension DataMember="tensach" UniqueName="DataItem2" />
      </DataItems>
      <SeriesDimensions>
        <SeriesDimension UniqueName="DataItem2" />
      </SeriesDimensions>
      <Arguments>
        <Argument UniqueName="DataItem1" />
      </Arguments>
      <Panes>
        <Pane Name="Pane 1">
          <Series>
            <Simple SeriesType="FullStackedBar">
              <Value UniqueName="DataItem0" />
            </Simple>
          </Series>
        </Pane>
      </Panes>
    </Chart>
  </Items>
  <Groups>
    <Group ComponentName="DashboardItemGroup1" Name="Đang Mượn" />
    <Group ComponentName="DashboardItemGroup2" Name="Lịch Sử Mượn" />
  </Groups>
  <LayoutTree>
    <LayoutGroup>
      <LayoutGroup Orientation="Vertical" DashboardItem="DashboardItemGroup1" Weight="50.865800865800864">
        <LayoutGroup Weight="50">
          <LayoutItem DashboardItem="PieDashboardItem1" Weight="50.232558139534881" />
          <LayoutItem DashboardItem="PieDashboardItem2" Weight="49.767441860465119" />
        </LayoutGroup>
        <LayoutGroup Weight="50">
          <LayoutItem DashboardItem="ChartDashboardItem1" Weight="50.232558139534881" />
          <LayoutItem DashboardItem="ChartDashboardItem2" Weight="49.767441860465119" />
        </LayoutGroup>
      </LayoutGroup>
      <LayoutGroup DashboardItem="DashboardItemGroup2" Weight="49.134199134199136">
        <LayoutGroup Orientation="Vertical" Weight="50.24154589371981">
          <LayoutItem DashboardItem="PieDashboardItem3" Weight="50" />
          <LayoutItem DashboardItem="ChartDashboardItem3" Weight="50" />
        </LayoutGroup>
        <LayoutItem DashboardItem="ChartDashboardItem4" Weight="49.75845410628019" />
      </LayoutGroup>
    </LayoutGroup>
  </LayoutTree>
</Dashboard>